package Controller;

import lejos.robotics.navigation.TachoPilot;
import lejos.robotics.subsumption.*;

public class LookForLine implements Behavior{
	private boolean suppressed = false;
	private TachoPilot pilot;
	
	
	public LookForLine(TachoPilot pilot){
		this.pilot = pilot;
	}
	
	public boolean takeControl(){
		//Standaardgedrag van de robot is vooruitgaan
		return true; 
	}
	
	public void suppress(){
		pilot.stop();
		suppressed = true;
	}
	
	public void action(){
		suppressed = false;
		while(!suppressed){
			pilot.travel(5);
			pilot.rotate(10);
		}
	}
}
